<?php

// uncomment the following to define a path alias
// Yii::setPathOfAlias('local','path/to/local-folder');

// This is the main Web application configuration. Any writable
// CWebApplication properties can be configured here.
return array(

	'basePath'=>dirname(__FILE__).DIRECTORY_SEPARATOR.'..',
	
	// preloading 'log' component
	'preload'=>array('log'),

	// autoloading model and component classes
	'import'=>array(
		'application.models.*',
		'application.components.*',
	),
	// application components
	'components'=>array(
	    'file'=>array(
			'class' => 'application.components.File',
			'key' => 'file',
			'name'=>uniqid(),
		),
		'simpleImage'=>array(
            'class' => 'application.extensions.CSimpleImage',
        ),
			
		'imagemod' => array(
           //alias to dir, where you unpacked extension
            'class' => 'application.extensions.imagemodifier.CImageModifier',
        ),
		//安全设置
		'request'=>array(
            'enableCsrfValidation'=>false,
			'enableCookieValidation'=>true,
			'class' => 'application.components.EHttpRequest',
        ),		
		'errorHandler'=>array(
			// use 'site/error' action to display errors
			'errorAction'=>'admin/default/error',
		),
		'log'=>array(
			'class'=>'CLogRouter',
			'routes'=>array(
				array(
					'class'=>'CFileLogRoute',
					'levels'=>'error, warning',
				),
				// uncomment the following to show log messages on web pages
				/*
				array(
					'class'=>'CWebLogRoute',
				),
				*/
			),
		),

        'session'=>array(
            'timeout'=>86400,
            'sessionName' => 'FAM365',
            'cookieParams' => array(
                'secure' => false,
                'httponly'=>true,
//                'lifetime' => 86400
            ),
        ),
	),

	
);